1. Field of the Invention
The present invention relates to image processing method and apparatus which improve a distribution of brightness of a digital image.
2. Related Background Art
Conventionally, as a method of taking a photograph of appropriate brightness, a method of measuring average luminance of a scene to be taken or photographed and then controlling shutter speed, a aperture value and the like based on the measured average luminance is known. Moreover, an exposure control method based on so-called evaluation photometry that a scene is first divided into predetermined areas, luminance of each of the divided areas is measured, the measured luminance is appropriately weighted with respect to each area, average luminance is then obtained based on the weighted values, and appropriate exposure is thus obtained with respect to the entire scene is known.
Incidentally, in a scene taken against light (also called a backlight scene) that the brightness of a main subject is remarkably dark as compared with that of its background, the main subject portion on a taken or photographed image is inevitably dark. Therefore, to take a photograph in which appropriate brightness can be secured even in case of a backlight scene, it is necessary at the moment of taking the photograph to preset exposure of a camera so that the subject is taken brightly as compared with a case of taking an average photograph. However, such an exposure correction operation is troublesome for a user, and moreover skill is required to appropriately set the exposure of the camera. Besides, even if the exposure correction is appropriately performed with respect to the main subject, the background portion of the main subject adversely tends to become bright excessively.
In order to solve such a problem, it is necessary to obtain an image of appropriate brightness even in the backlight scene or the like that it is generally difficult to appropriately determine the brightness of the image.
Thus, to achieve this, in analog photographing technique, print of appropriate brightness can be obtained by performing so-called a dodging process in a darkroom. Therefore, it is desirable even in a digital image process to easily achieve a dodging process similar to that in the analog photographing technique.
For example, a method of achieving the dodging process is proposed by Daniel J. Jobson et al. in “A Multiscale Retinex for Bridging the Gap Between Color Images and the Human Observation of Scenes”, IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 6, NO. 7, July 1997 (hereinafter called a prior art 1). In this method, a difference process between a component obtained by logarithmic transforming a digital image and a low-frequency component of the logarithmic-transformed component is performed to darken a bright component and brighten a dark component in a low-frequency area in the digital image, thereby achieving image improvement.
Besides, another method of achieving the dodging process in the digital image process is proposed by Reinhard et al. in “Photographic Tone Reproduction for Digital Images”, acm Transactions on Graphics, July 2002, Vol. 21, No. 3 (hereinafter called a prior art 2), in which a dodging-like effect is obtained in the digital image process by using a luminance component of a digital image and a low-frequency component thereof.
However, in the above conventional methods, there is a problem that, in a case where the image data in which the improvement process has been performed to the brightness of the digital image to be processed cannot be fell within the range of a predetermined color space, a gradation jump and a color tone displacement (aberration) occur with respect to the color of the image data outside the color space because it is replaced with the color on the border area of the color space and the replaced color is then output.
Moreover, in the above conventional methods, there is a problem that, in the image data in which the improvement process has been performed to the brightness of the digital image to be processed, a contrast in the low-frequency area of the image deteriorates because a black level and a white level in the low-frequency area change, whereby the image becomes vague as a whole.